home *** CD-ROM | disk | FTP | other *** search
- global ghfathlete, ghfathletelist, gHFsearchlist, gHFposition, gHFactivelist, gHFstate, gHFline, gHFsearchcastmember, gHFAthleteMode, gHFlastTicket, gHFaList, gHFsList, gHFaMax, gHFsMax, gHFpageno, gHFpastathleteno, gHFpage1, gHFpage2, gHFpage3, gHFpage4, gHFlinesdisply, ghfathleteno, ghfmaxathleteno, ghfslideno, gHFsidebarno, gHFmaxsidebarno, gHFpass, gHFpreviousline, gHFDone
-
- on startMovie
- global gHSCount, gSIlinkinfo, gSIVideoPath, gSISystem
- set the exitLock to 1
- set the visible of sprite 19 to 1
- set the visible of sprite 30 to 1
- set the visible of sprite 31 to 1
- set the visible of sprite 32 to 1
- set the stretch of sprite 13 to 0
- set the stretch of sprite 2 to 0
- DVSetPlayArea(161, 108, 320, 240)
- InitHotLinks()
- set gHFDone to 0
- set gHFAthleteMode to 1
- set gHFlastTicket to 0
- puppetSprite(16, 1)
- preLoadCast(71, 73)
- preLoadCast(83, 87)
- set gHFsList to []
- set gHFsMax to 0
- set the itemDelimiter to numToChar(13)
- set vNum to the number of cast "database"
- set vlines to the number of lines in field vNum
- if (ghfathlete = []) or not objectp(ghfathlete) then
- set ghfathlete to []
- repeat with vcounter = 1 to vlines
- append(ghfathlete, item vcounter of field vNum)
- end repeat
- set gHFaList to value(string(ghfathlete))
- end if
- put "DUCK" && gSIlinkinfo && value(gSIlinkinfo)
- if value(gSIlinkinfo) = 0 then
- put "Duck RESTORE"
- set ghfathleteno to value(HSStateGet("hf", "gHFathleteno"))
- set gHFpastathleteno to value(HSStateGet("hf", "gHFpastathleteno"))
- set gHFposition to value(HSStateGet("hf", "gHFposition"))
- set ghfslideno to value(HSStateGet("hf", "gHFslideno"))
- else
- put "Duck LINK"
- set ghfathleteno to gSIlinkinfo
- set gHFpastathleteno to 0
- set gHFposition to athleteToPosition(ghfathleteno)
- set ghfslideno to 1
- set gSIlinkinfo to EMPTY
- end if
- if ghfathleteno = 0 then
- put "Duck DEFAULT"
- set ghfathleteno to "001"
- set gHFpastathleteno to 0
- set gHFposition to athleteToPosition(ghfathleteno)
- set ghfslideno to 1
- end if
- set ghfathlete to []
- set ghfmaxathleteno to 285
- set gHFaMax to ghfmaxathleteno
- set gHFpageno to 1
- set gHFlinesdisply to 19
- set gHFsidebarno to 1
- set gHFmaxsidebarno to 2
- set the itemDelimiter to numToChar(13)
- set vNum to the number of cast "database"
- set vlines to the number of lines in field vNum
- if ghfathlete = [] then
- repeat with vcounter = 1 to vlines
- append(ghfathlete, item vcounter of field vNum)
- end repeat
- end if
- set the visible of sprite 20 to 0
- puppetSprite(15, 1)
- puppetSprite(16, 1)
- paintscreen()
- updateStage()
- if gSISystem = "WIN" then
- mci("open " & gSIVideoPath & "hofpal.mov type QTWVideo alias hofpal")
- mci("status hofpal palette handle")
- set vPal to the result
- else
- set vPal to EMPTY
- end if
- DVUse(gSIVideoPath & "HALLFAME")
- mci("realize dvvid background")
- end
-
- on cleanUp
- global gSISystem
- DVClose()
- if gSISystem = "WIN" then
- mci("close hofpal")
- end if
- HSStatePut("hf", "gHFathleteno", string(ghfathleteno))
- HSStatePut("hf", "gHFpastathleteno", string(gHFpastathleteno))
- HSStatePut("hf", "gHFposition", string(gHFposition))
- HSStatePut("hf", "gHFslideno", string(ghfslideno))
- end
-
- on keyDown
- if the keyCode = 122 then
- LaunchHelp()
- end if
- end
-
- on paintscreen
- set gHFsearchcastmember to 11
- set the itemDelimiter to ","
- set ghfathleteno to item 2 of getaProp(ghfathlete, gHFposition)
- LoadAthleteDB()
- set the visible of sprite 12 to 0
- set vName to item 6 of getaProp(ghfathlete, gHFposition)
- if vName = "SS" then
- set the visible of sprite 12 to 1
- end if
- set the itemDelimiter to ","
- set vName to item 6 of getaProp(ghfathlete, gHFposition)
- set athletename to "AN" & vName & ghfathleteno & ".PCT"
- puppetSprite(2, 1)
- set the castNum of sprite 2 to cast GetAssetNo(athletename)
- set the stretch of sprite 2 to 0
- set vName to "BIO" & ghfathleteno
- set gHFpageno to 1
- puppetSprite(4, 1)
- set the castNum of sprite 4 to cast GetAssetNo(vName & gHFpageno)
- set vpages to item 1 of getaProp(ghfathlete, gHFposition)
- set vpagingcaption to "1 of " & vpages
- set the text of cast 28 to vpagingcaption
- set vName to "TN" & ghfathleteno
- puppetSprite(11, 1)
- set the castNum of sprite 11 to cast GetAssetNo(vName)
- puppetSprite(3, 1)
- set the itemDelimiter to ","
- set vName to item 7 of getaProp(ghfathlete, gHFposition)
- set vslidev to "SFV" & vName & ".PCT"
- set vslideh to "SFH" & vName & ".PCT"
- set ghfslideno to "01"
- set vName to "IM" & ghfathleteno & ghfslideno
- puppetSprite(13, 1)
- set the stretch of sprite 13 to 0
- set the regPoint of cast GetAssetNo(vName) to point(0, 0)
- set the castNum of sprite 13 to cast GetAssetNo(vName)
- if the width of cast GetAssetNo(vName) > the height of cast GetAssetNo(vName) then
- set the castNum of sprite 3 to cast vslideh
- set the regPoint of cast vslideh to point(320, 240)
- set the locV of sprite 3 to 240
- set the locH of sprite 3 to 320
- set the locV of sprite 13 to 110
- set the locH of sprite 13 to 377
- else
- set the castNum of sprite 3 to cast vslidev
- set the regPoint of cast vslidev to point(320, 240)
- set the locV of sprite 3 to 240
- set the locH of sprite 3 to 320
- set the locV of sprite 13 to 87
- set the locH of sprite 13 to 402
- end if
- liteled()
- set the itemDelimiter to ","
- set vnumofslides to item 3 of getaProp(ghfathlete, gHFposition)
- if vnumofslides = 1 then
- set the visible of sprite 18 to 0
- set the visible of sprite 19 to 0
- set the visible of sprite 21 to 1
- else
- set the visible of sprite 18 to 1
- set the visible of sprite 19 to 1
- set the visible of sprite 21 to 0
- end if
- set vName to "HFSK0" & vnumofslides & ".pct"
- puppetSprite(14, 1)
- set the castNum of sprite 14 to cast vName
- set vVis to 0
- repeat with vI = 1 to 3
- if GetAssetNo("SIDE" & ghfathleteno & "11" & vI) >= 1 then
- set vVis to 1
- exit repeat
- end if
- end repeat
- set the visible of sprite 30 to vVis
- set vVis to 0
- repeat with vI = 1 to 3
- if GetAssetNo("SIDE" & ghfathleteno & "21" & vI) >= 1 then
- set vVis to 1
- exit repeat
- end if
- end repeat
- set the visible of sprite 31 to vVis
- set vVis to 0
- repeat with vI = 1 to 3
- if GetAssetNo("SIDE" & ghfathleteno & "31" & vI) >= 1 then
- set vVis to 1
- exit repeat
- end if
- end repeat
- set the visible of sprite 32 to vVis
- set the visible of sprite 9 to 0
- set the itemDelimiter to ","
- set vTemp to item 8 of getaProp(ghfathlete, gHFposition)
- if vTemp = 1 then
- set the visible of sprite 39 to 1
- else
- set the visible of sprite 39 to 0
- end if
- set the itemDelimiter to ","
- set vTemp to item 10 of getaProp(ghfathlete, gHFposition)
- if vTemp = 1 then
- set the visible of sprite 10 to 1
- else
- set the visible of sprite 10 to 0
- end if
- updateStage()
- end
-
- on changeslide2
- set the itemDelimiter to ","
- set vnumberofslides to item 3 of getaProp(ghfathlete, gHFposition)
- if gHFstate = "button" then
- set vlocation to the mouseH
- set vSKLoc to [rect(425, 336, 450, 365), rect(449, 352, 474, 381), rect(472, 335, 497, 364), rect(484, 365, 509, 394), rect(511, 349, 536, 378), rect(537, 341, 562, 370), rect(549, 374, 574, 403), rect(583, 350, 608, 379)]
- set vPoint to point(the mouseH, the mouseV)
- set vslide to 1
- repeat with vI = 1 to vnumberofslides
- if inside(vPoint, getAt(vSKLoc, vI)) then
- set vslide to vI
- exit repeat
- end if
- end repeat
- end if
- if gHFstate = "right" then
- set vslide to value(ghfslideno) + 1
- else
- if gHFstate = "left" then
- set vslide to value(ghfslideno) - 1
- end if
- end if
- if vslide > vnumberofslides then
- set vslide to 1
- end if
- if vslide < 1 then
- set vslide to vnumberofslides
- end if
- puppetSprite(3, 1)
- set the itemDelimiter to ","
- set vName to item 7 of getaProp(ghfathlete, gHFposition)
- set vslidev to "SFV" & vName & ".PCT"
- set vslideh to "SFH" & vName & ".PCT"
- set vName to "IM" & ghfathleteno & "0" & vslide
- if vslide <> ghfslideno then
- puppetSprite(13, 1)
- set the stretch of sprite 13 to 0
- set the castNum of sprite 13 to cast GetAssetNo(vName)
- set the regPoint of cast GetAssetNo(vName) to point(0, 0)
- if the width of cast GetAssetNo(vName) > the height of cast GetAssetNo(vName) then
- set the castNum of sprite 3 to cast vslideh
- set the regPoint of cast vslideh to point(320, 240)
- set the locV of sprite 3 to 240
- set the locH of sprite 3 to 320
- set the locV of sprite 13 to 110
- set the locH of sprite 13 to 377
- else
- set the castNum of sprite 3 to cast vslidev
- set the regPoint of cast vslidev to point(320, 240)
- set the locV of sprite 3 to 240
- set the locH of sprite 3 to 320
- set the locV of sprite 13 to 87
- set the locH of sprite 13 to 402
- end if
- puppetSound("flip.aif")
- updateStage()
- end if
- set ghfslideno to vslide
- liteled()
- set gHFstate to "0"
- end
-
- on changes
- puppetSound("page.aif")
- updateStage()
- set vcurrentpage to gHFpageno
- set vName to "BIO" & ghfathleteno
- if gHFstate = "next" then
- set gHFpageno to gHFpageno + 1
- if GetAssetNo(vName & gHFpageno) < 1 then
- set gHFpageno to 1
- end if
- end if
- if gHFstate = "previous" then
- set gHFpageno to gHFpageno - 1
- if gHFpageno < 1 then
- set gHFpageno to item 1 of getaProp(ghfathlete, gHFposition)
- end if
- end if
- set gHFpageno to integer(gHFpageno)
- set vtemp123 to "gHFpage" & gHFpageno
- if vcurrentpage <> gHFpageno then
- set the castNum of sprite 4 to cast GetAssetNo(vName & gHFpageno)
- end if
- set vpages to item 1 of getaProp(ghfathlete, gHFposition)
- set vpagingcaption to gHFpageno & " of " & vpages
- set the text of cast 28 to vpagingcaption
- set gHFstate to "0"
- end
-
- on athlete
- SetCursor(#wait)
- if gHFstate starts "goto:" then
- set vTmp to char 6 to 9 of gHFstate
- set ghfathleteno to vTmp
- set gHFpastathleteno to 0
- set gHFposition to athleteToPosition(vTmp)
- set ghfslideno to 1
- else
- if gHFstate = "greater" then
- set gHFposition to gHFposition + 1
- else
- set gHFposition to gHFposition - 1
- end if
- end if
- puppetSound("clik2.aif")
- updateStage()
- set gHFsidebarno to 1
- if gHFposition > ghfmaxathleteno then
- set gHFposition to 1
- end if
- if gHFposition < 1 then
- set gHFposition to ghfmaxathleteno
- end if
- paintscreen()
- set gHFstate to "0"
- SetCursor(#normal)
- end
-
- on wait
- repeat while the mouseDown = 0
- nothing()
- end repeat
- dontPassEvent()
- end
-
- on pagetext
- set the text of cast "page1" to EMPTY
- set the text of cast "page2" to EMPTY
- set the text of cast "page3" to EMPTY
- set the text of cast "page4" to EMPTY
- set the text of cast "page5" to EMPTY
- set the text of cast "page6" to EMPTY
- set vName to "BIO" & ghfathleteno
- repeat with vI = 1 to 6
- if the number of cast (vName & vI) > 1 then
- set the text of cast ("page" & vI) to the text of cast GetAssetNo(vName & vI)
- next repeat
- end if
- exit repeat
- end repeat
- end
-
- on mouseDown
- global ghfathleteno, ghfslideno
- if the frame = 1 then
- set locH to the mouseH
- set locV to the mouseV
- if (locH > 430) and (locH < 600) then
- if (locV > 127) and (locV < 300) then
- set vTemp to value(ghfslideno)
- set vName to "CAP" & ghfathleteno & "0" & vTemp
- if GetAssetNo(vName) >= 1 then
- dontPassEvent()
- go("displaycaption")
- end if
- exit
- end if
- end if
- hPressButton()
- end if
- end
-
- on exitFrame
- UIRollover(47, 48)
- hRolloverScript()
- ticketRollover()
- go(1)
- end
-
- on hPressButton aStayDown
- global gLastSprite
- if voidp(aStayDown) then
- set aStayDown to 0
- end if
- set vSprite to the clickOn
- if not ((vSprite = 1) or (vSprite = 2) or (vSprite = 0) or (vSprite = 4) or (vSprite = 14) or (vSprite = 3) or (vSprite = 16)) then
- set vCastNo to the castNum of sprite vSprite
- set vCastNam to the name of cast vCastNo
- puppetSprite(vSprite, 1)
- if (vCastNam = 0) or (vCastNam = EMPTY) then
- set the castNum of sprite vSprite to vCastNo + 1
- else
- if vCastNam contains "ROLLOVER" then
- set the castNum of sprite vSprite to vCastNo + 1
- else
- set the castNum of sprite vSprite to the number of cast (vCastNam & "-down")
- end if
- end if
- updateStage()
- repeat while the stillDown
- nothing()
- end repeat
- if (the mouseCast = the castNum of sprite vSprite) and aStayDown then
- nothing()
- else
- if (vCastNam = 0) or (vCastNam = EMPTY) then
- set the castNum of sprite vSprite to vCastNo
- else
- set the castNum of sprite vSprite to the number of cast vCastNam
- end if
- set gLastSprite to 0
- puppetSprite(vSprite, 0)
- updateStage()
- end if
- if the mouseCast = the castNum of sprite vSprite then
- return 1
- else
- return 0
- end if
- end if
- end
-